# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-subprocess32
_pkgname=subprocess32
pkgver=3.5.4
pkgrel=1
pkgdesc='A backport of the subprocess module from Python 3 for use on 2.x.'
url='https://pypi.org/project/subprocess32/#files'
arch=('x86_64' 'aarch64')
license=('PSF')
depends=('python2')
makedepends=('python2-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('c811bdb5842d9f5ed9e51df4d13ba39045fbe98ca6e90a2c8138e68e44c2a55a2f0f3eb3e77e26caa3f88c360584912b001a0ca37ba68ac6c946c68c7a37d29a')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

